unit ufrmWebBrowser;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Buttons, ExtCtrls, OleCtrls, SHDocVw, StdCtrls;

type
  TfrmWebBrowser = class(TForm)
    pnlTool: TPanel;
    btnProximo: TSpeedButton;
    pnl1: TPanel;
    btnSair: TSpeedButton;
    wb1: TWebBrowser;
    pnlPesquisa: TPanel;
    lbl1: TLabel;
    lbl2: TLabel;
    lblTitulo: TLabel;
    lblAutor: TLabel;
    procedure btnSairClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure btnProximoClick(Sender: TObject);
  private
    { Private declarations }
    url: array of string;
    i: Integer;
  public
    { Public declarations }
    procedure setURLs(value: Array of String);
  end;

var
  frmWebBrowser: TfrmWebBrowser;

implementation

uses Math;

{$R *.dfm}

procedure TfrmWebBrowser.btnSairClick(Sender: TObject);
begin
  close;
end;

procedure TfrmWebBrowser.setURLs(value: array of String);
var i: Integer;
begin
  SetLength(url,Length(value));
  for i := 0 to Length(value) - 1 do
    url[i] := value[i];
end;

procedure TfrmWebBrowser.FormCreate(Sender: TObject);
begin
  i := 1;
end;

procedure TfrmWebBrowser.btnProximoClick(Sender: TObject);
begin
  wb1.Navigate(url[i]);
  if i < length(url) then
   Inc(i); 
end;

end.
